package o;

import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.s;
import java.util.ArrayList;
import o.ejh.b;
import o.ewm.e;
import o.mi.d;

public class eji extends d {
    private ejh ˋ;
    private String ॱ;

    public eji(ejh o_ejh, String str) {
        this.ˋ = o_ejh;
        this.ॱ = str;
    }

    public int ˋ(RecyclerView recyclerView, s sVar) {
        if (Logger.ˎ()) {
            Logger.ˏ("SubTabItemTouchCallback", "getMovementFlags");
        }
        this.ˋ.ॱ();
        return d.ˋ(15, 0);
    }

    public boolean ˊ(RecyclerView recyclerView, s sVar, s sVar2) {
        if (sVar instanceof b) {
            if (Logger.ˎ()) {
                Logger.ˏ("SubTabItemTouchCallback", "onMove");
            }
            if (((b) sVar2).ʻॱ) {
                if (Logger.ˎ()) {
                    Logger.ˏ("SubTabItemTouchCallback", "swap");
                }
                ArrayList ˋ = ejn.ˋ().ˋ(this.ॱ);
                if (!CollectCheck.isEmpty(ˋ)) {
                    ˋ.add(sVar2.ˋ(), ˋ.remove(sVar.ˋ()));
                    this.ˋ.ˎ(ˋ);
                    this.ˋ.ˋ(sVar.ˋ(), sVar2.ˋ());
                }
            } else if (Logger.ˎ()) {
                Logger.ˏ("SubTabItemTouchCallback", "Don't move");
            }
        }
        return false;
    }

    public void ॱ(s sVar, int i) {
        if (i != 0) {
            ((b) sVar).ॱᐝ.setBackgroundResource(e.ॱˋ);
        }
        super.ॱ(sVar, i);
    }

    public void ˊ(RecyclerView recyclerView, s sVar) {
        super.ˊ(recyclerView, sVar);
        if (Logger.ˎ()) {
            Logger.ˏ("SubTabItemTouchCallback", "clearView");
        }
        if (((b) sVar).ʻॱ) {
            ((b) sVar).ॱᐝ.setBackgroundResource(e.ॱᐝ);
        }
        this.ˋ.ʻ();
    }

    public void ˊ(s sVar, int i) {
        if (Logger.ˎ()) {
            Logger.ˏ("SubTabItemTouchCallback", "onSwiped");
        }
    }

    public boolean ˎ() {
        if (Logger.ˎ()) {
            Logger.ˏ("SubTabItemTouchCallback", "onSwiped");
        }
        return false;
    }
}
